import { customRequest } from '@/utils/request'

const userApis = {
	login: '/api/user/login',
}

export interface LoginDto {
	username: string
	password: string
}
export interface ILogin {
	token: string
}
export const Login = (data: LoginDto) => {
	return customRequest<ILogin>({
		url: userApis.login,
		method: 'post',
		data,
	})
}
